package com.shycloud.mido.member.service;

import com.shycloud.mido.member.api.vo.TeacherVO;
import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.shycloud.mido.member.api.entity.OrgStudentDetailed;
import com.shycloud.mido.member.api.entity.OrgTeacherDetailed;
import com.shycloud.mido.member.api.entity.Teacher;
import com.shycloud.mido.member.api.vo.MyTeacherVO;
import com.shycloud.mido.member.api.vo.SmMemberTeacherGroupVO;
import com.shycloud.mido.member.api.vo.StudentVO;

/**
 * 教师管理模块
 *
 * @author nianhua.jiang
 * @date 2020/6/16 13:51
 */
public interface TeacherService extends IService<Teacher> {

	/**
	 * 获取教师信息
	 *
	 * @param
	 * @return com.shycloud.mido.member.api.entity.OrgTeacherDetailed
	 * @author nianhua.jiang
	 * @date 2020/6/22 16:42
	 */
	OrgTeacherDetailed getTeacher(Integer orgId, String memberId);

	/**
	 * 获取教师信息(根据学生ID)
	 *
	 * @param
	 * @return com.shycloud.mido.member.api.entity.OrgTeacherDetailed
	 * @author nianhua.jiang
	 * @date 2020/6/22 16:42
	 */
	String getCurTeacherIdByStudentId(String studentId);

	/**
	 * 获取学生所有历史教师信息(根据学生ID)
	 *
	 * @param
	 * @return com.shycloud.mido.member.api.entity.OrgTeacherDetailed
	 * @author nianhua.jiang
	 * @date 2020/6/22 16:42
	 */
	List<String> getTeacherIdsByStudentId(String studentId);

	/**
	 * 获取我的教师信息
	 *
	 * @param memberId
	 * @return com.shycloud.mido.member.api.vo.MyTeacherVO
	 * @author nianhua.jiang
	 * @date 2020/6/16 13:47
	 */
	MyTeacherVO getMyTeacher(String memberId, Integer orgId);

	MyTeacherVO getMyTeacher(String studentId);

	/**
	 * 获取学生列表
	 *
	 * @param page
	 * @param orgId
	 * @param groupId
	 * @param memberId
	 * @return com.shycloud.mido.member.api.vo.StudentVO
	 * @author nianhua.jiang
	 * @date 2020/6/19 18:28
	 */
	IPage<StudentVO> getStudentDetail(Page page, Integer orgId, Integer groupId, String memberId);

	/**
	 * 教师获取学生分组列表
	 *
	 * @param orgId
	 * @return java.util.Map<java.lang.String, java.lang.Object>
	 * @author nianhua.jiang
	 * @date 2020/6/22 11:17
	 */
	List<SmMemberTeacherGroupVO> getGroupList(Integer orgId);

	/**
	 * 获取学生个数
	 *
	 * @param orgId
	 * @param memberId
	 * @return int
	 * @author nianhua.jiang
	 * @date 2020/6/23 17:54
	 */
	int getStudentCount(Integer orgId, String memberId);

	/**
	 * 教师添加学生
	 *
	 * @param orgId
	 * @param teacherId
	 * @param studentMemberId
	 * @return java.lang.Boolean
	 * @author nianhua.jiang
	 * @date 2020/7/1 10:24
	 */
	Boolean addStudentByTeacher(Integer orgId, String teacherId, String studentMemberId, OrgStudentDetailed studentDetailed);

	/**
	 * 批量移除学生
	 *
	 * @param studentIdArr
	 * @return java.lang.Boolean
	 * @author nianhua.jiang
	 * @date 2020/8/3 10:51
	 */
	Boolean removeStudentBatch(List<String> studentIdArr, Integer orgId);

	IPage<StudentVO> getStudentByParent(Integer orgId, String memberId);

	StudentVO getStudentInfo(String studentId);

	IPage<StudentVO> searchStudent(Integer current, Integer size, String name, String teacherId);

	/**
	 * 解除师生关系
	 *
	 * @param studentId 学生ID
	 * @param teacherId 教师ID
	 * @return java.lang.Boolean
	 * @author nianhua.jiang
	 * @date 2021/6/10 17:48
	 */
	Boolean dismiss(String studentId, String teacherId, String identity);

	List<StudentVO> getStudentList(String teacherId);

	StudentVO getStudent(String studentId);

	Map getStudentAssignBal(String studentId);

	Boolean consumeAssginBal(String studentId, Integer curConsume, Integer nextConsume);

	OrgTeacherDetailed getTeacherByUsername(String teaUsername);

	OrgTeacherDetailed getTeacherByMemberId(String memberId);

	TeacherVO getTeacherInfo(String teacherId);
}
